#!/bin/bash
CONF=/etc/upmpdcli.conf
if [ "$1" == "" ]; then
 # Just display the setting
 cat /etc/upmpdcli.conf | grep ohproductroom | awk -F= '{print $2}' | xargs echo 
else
 ROOM_SED_SPACES=`echo $1 | sed 's/\ /\\\\\\ /g'`
 sed -i "s/ohproductroom.*/ohproductroom\ =\ $ROOM_SED_SPACES/" $CONF
 systemctl restart upmpdcli 1>/dev/null 2>/dev/null
 echo $1
fi
